﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HomeWork
{
    class Demo3
    {
        public static void FindMax() {
            int num1, num2, num3;
            Console.WriteLine("请输入第一个数：");
            string temp1 = Console.ReadLine();
            num1 = int.Parse(temp1);
            Console.WriteLine("请输入第二个数：");
            string temp2 = Console.ReadLine();
            num2 = int.Parse(temp2);
            Console.WriteLine("请输入第三个数：");
            string temp3 = Console.ReadLine();
            num3 = int.Parse(temp3);

            int max=0;
            if (num1 > max){
                max = num1;
            }
            if (num2 > max){
                max = num2;
            }
            if(num3>max){
                max = num3;
            }

            Console.WriteLine("最大值为" + max);
            Console.ReadLine();
        }
    }
}
